package com.hanhai.zrb.model.user.enums;

public enum GenderParam {
	
	MANS(0,"未知"),//
	WOMENS(1,"男"),//待审核
	OTHERS(2,"女"),//发布
	;
	
	private Integer code;
	
	private String value;
	
	private GenderParam (int code,String value){
		this.code = code;
		this.value = value;
	}
	
	public Integer getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}

	public static GenderParam getByCode(int code){
		for(GenderParam status:GenderParam.values()){
			if(status.getCode() == code){
				return status;
			}
		}
		return null;
	}

	
	public static void main(String[] args) {

		for(GenderParam status :GenderParam.values()){
			System.out.println("code="+status.getCode()+ " values = "+status.getValue());
		}
	}
}
